libHaru is a free, cross platform, open source library for generating PDF files.
